#include "startwindow.h"

StartWindow::StartWindow(QWidget *parent)
	: QDialog(parent)
{
	ui.setupUi(this);
	mainWnd=(visual *)parent;

	switch (mainWnd->flagType)
	{
	case 0:
		ui.brickwall->setChecked(true);
		break;
	case 1:
		ui.warehouse->setChecked(true);
		break;
	}

	connect(ui.button_ok,			SIGNAL(clicked()),				this, SLOT(changeType()));
	connect(ui.button_cancel,		SIGNAL(clicked()),				this, SLOT(reject()));
}

StartWindow::~StartWindow(){}

void StartWindow::changeType()
{
	if (ui.brickwall->isChecked())
		flag=0;
	if (ui.warehouse->isChecked())
		flag=1;
	accept();
}
